#!/usr/bin/env bash
arr=(1 2 3 4 5)
#for i in ${arr[*]};
#do
#    echo -e "$i \c";
#done;

#echo 'mysql管理:'
#echo '1. 启动'
#echo '2. 停止'
#echo '3. 重启'
#echo '4. 退出'
#read -p "请输入菜单编号：" -n 1 aNum
#case $aNum in
#    1)  echo -e '\n启动ing...'
#    ;;
#    2)  echo -e '\n停止ing...'
#    ;;
#    3)  echo -e '\n重启ing...'
#    ;;
#    4)  echo -e '\n退出ing...'
#    ;;
#    *)  echo -e '\n无效的编号！'
#    ;;
#esac

while :
do
    echo "退出请输入0"
    read -p "请输入第一个数：" num1
    if [ $num1 == 0 ]
    then
        echo "结束！"
        break
    fi
    read -p "请输入第二个数：" num2
    case $num1 in
        0) echo "结束！"
           break
        ;;
        *) echo "$num1+$num2="`expr ${num1} + ${num2}`
    esac
done